<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="../js/style.css" />
<script language="javascript" src="../js/PopupCalendar.js" ></script>
<title>湖北包装网会员管理系统</title></head>
<body>
<script>
	 function addcheck(){
	     if(addtype.type_name.value==""){
		      alert("请您输入登陆名！");
			  return false;
		 }else{
			 return true;
		 }
	 }
	 function delcheck(id){
	 	 if(confirm("是否删除?"))
	    {
	       window.location.href="../user/delCompanyType.action?type_id="+id;
	    }
	 }
</script>
<jsp:include page="adminTitle.jsp" flush="true"></jsp:include>
<div id="mainpage">
  <div class="bodytitle">
    <div class="bodytitleleft"></div>
    <div class="bodytitletxt">专业类别维护 </div>
    <!-- <div class="bodytitletxt2"><a href="../user/getComNatrue.action">经济性质维护</a></div> -->
  </div>
  <div>
  	
  </div>
  <table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable">
		<thead>
			<tr>
				<th class="nosort"><h3>专业类别名称</h3></th>
				<th class="nosort"><h3>查看子类别</h3></th>
				<th class="nosort"><h3>编辑</h3></th>
				<th class="nosort"><h3>删除</h3></th>
			</tr>
		</thead>
		<tbody>
		<s:iterator value="comTypeList">
			<tr>
				<td><a href="#"><font size="2px"><s:property value="type_name"/></font></a></td>
				<td><img src="img/ico-edit.gif" onclick='location.href="../user/getCompanyTypeInfoList.action?type_id=<s:property value="type_id"/>"' style="cursor: hand"/></td>
				<td><img src="img/ico-edit.gif" onclick='location.href="../user/getComTypeByid.action?type_id=<s:property value="type_id"/>"' style="cursor: hand"/></td>
				<td><img src="img/ico-del1.gif" onclick='delcheck(<s:property value="type_id"/>)' style="cursor: hand"/></td>
			</tr>
		</s:iterator>
		</tbody>
  </table>
  
	<div id="controls">
		<div id="perpage">
			<select onchange="sorter.size(this.value)">
			    <option value="5">5</option>
				<option value="10" selected="selected">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span><font size="2px">输入分页条数</font></span>
		</div>
		<div></div>
		<div id="navigation">
			<img src="../js/images/first.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1,true)" />
			<img src="../js/images/previous.gif" width="16" height="16" alt="First Page" onclick="sorter.move(-1)" />
			<img src="../js/images/next.gif" width="16" height="16" alt="First Page" onclick="sorter.move(1)" />
			<img src="../js/images/last.gif" width="16" height="16" alt="Last Page" onclick="sorter.move(1,true)" />
		</div>
		<div id="text"><font size="2px">显示页面： <span id="currentpage"></span> of <span id="pagelimit"></span> </font></div>
	</div>
	
	<form action="../user/addCompanyType.action" method="post" name="addtype" onsubmit="addcheck()">
	<table align="center">
		<tr>
			<td style="font-size: 12px">添加新专业类别</td>
			<td><input type="text" id="type_name" name="companyType.type_name" /><div style="color: red;font-size: 12px"><s:property value="tips"/></div> </td>
			<td><input type="submit" value="新增"/> </td>
		</tr>
	</table>
	</form>
	<script type="text/javascript" src="../js/script.js"></script>
	<script type="text/javascript">
    var sorter = new TINY.table.sorter("sorter");
	sorter.head = "head";
	sorter.asc = "asc";
	sorter.desc = "desc";
	sorter.even = "evenrow";
	sorter.odd = "oddrow";
	sorter.evensel = "evenselected";
	sorter.oddsel = "oddselected";
	sorter.paginate = true;
	sorter.currentid = "currentpage";
	sorter.limitid = "pagelimit";
	sorter.init("table");<!-- sorter.init("table",0);参数表示选中第几列  -->
	sorter.size(10);
  </script>
</div>
</body>
</html>